<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" assistInfo="IE=edge">
    <meta name="viewport" assistInfo="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="icon" type="image/ico" th:href="@{/images/favicon.ico}">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/index.css}">
    <title>修改帮助</title>
    <style>
        html{ background: #fff;}
    </style>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>修改帮助</legend>
</fieldset>
<!--新增修改界面-->
<form class="layui-form" id="editForm" lay-filter="editForm">
    <input type="hidden" name="assistId" th:value="${assistInfo.assistId}">
    <div class="layui-form-item">
        <label class="layui-form-label"><i class="layui-tip-required">*</i>所属类别</label>
        <input type="hidden" name="typeValue" th:value="${assistInfo.helpId}">
        <div class="layui-input-block" style="width:60%;margin-left: 95px;">
            <select id="type" name="helpId" lay-verify="required" >
                <option value="">请选择</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"><i class="layui-tip-required">*</i>帮助标题</label>
        <div class="layui-input-block" style="width:60%;">
            <input type="text" name="assistTitle" lay-verify="required|titleLen" autocomplete="off" placeholder="请输入标题"
                   class="layui-input layui-form-danger" th:value="${assistInfo.assistTitle}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">浮动广告:</label>
        <div class="layui-input-inline" style="width: 40%;">
            <div class="layui-upload">
                <button type="button" class="layui-btn" id="uploadBtn">上传图片</button>
                <input name="advertUrl" id="url"  th:value="${assistInfo.advertUrl}" value="" autocomplete="off" class="layui-input" type="hidden">
                <div class="layui-upload-list" id="uploadListDiv">
                    <img id="fileDiv" th:if="${assistInfo.advertUrl!= ''}" th:src="${assistInfo.advertUrl}" style="height: 137px;width: 137px;"/>
                </div>
                <p id="imgText"  class="layui-form-mid layui-word-aux">支持格式为png、jpg，大小在10M以内。</p>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">帮助描述</label>
        <textarea id="assistInfoText" th:utext="${assistInfo.assistText}" style="display: none;"></textarea>
        <div class="layui-input-block">
            <div id="ueditorText" style="width: 690px;min-height: 400px;"></div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button id="saveRecord" class="layui-btn" lay-submit lay-filter="editRecord">保存</button>
            <button id="backRecord" class="layui-btn layui-btn-primary" lay-filter="" type="button">返回</button>
        </div>
    </div>
</form>
<script type="text/javascript" th:src="@{/js/plugins/jquery-1.11.3.min.js}"></script>
<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
<!-- 百度Ueditor编辑器-->
<script type="text/javascript" th:src="@{/ueditor/ueditor.config.js}"></script>
<script type="text/javascript" th:src="@{/ueditor/ueditor.all.js}"></script>
<script type="text/javascript" th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
<script type="text/javascript" th:src="@{/js/modules/assistInfo/update.js}"></script>
</body>
</html>